package com.example.mobiledestroy.util;


import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class SMSService extends Service{
	
	@SuppressWarnings("deprecation")
	@Override
	public void onStart(Intent intent,int startId) {
		super.onStart(intent, startId);
		Log.i("service", "start");
	}

	@Override
	public void onDestroy(){
		Intent a = new Intent();
		a.setClass(this, SMSService.class);
		this.startService(a);
	}
	
	@Override
	public int onStartCommand(Intent intent,int flags,int startId){
//		SMSReceiver smsReceiver = new SMSReceiver();
		Toast.makeText(this, "SMSService start", Toast.LENGTH_LONG).show();
		
		return START_STICKY;
	}
	

	@Override
	public IBinder onBind(Intent intent) {
		// TODO Auto-generated method stub
		return null;
	}
}
